﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
namespace EttainGroup.Filters
{
    public class FilterFactory
    {
        public static IFilterRepository GetRepository(FilterRepositoryType type, string connectionString)
        {
            IFilterRepository repo = null;
            switch (type)
            {
                case FilterRepositoryType.Xml:
                    repo = new XmlFilterRepository(connectionString);
                    break;
                case FilterRepositoryType.Database:
                    repo = new DatabaseFilterRepository(connectionString);
                    break;
                default:
                    break;
            }
            return repo;
        }
    }
}
